home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-03-02 | 1.5 KB | 53 lines | [TEXT/MWPS] |
- {Tutorial MP Demonstration Program}
- {©FaceWare 1993-94. All Rights Reserved.}
-
- program TutorialMP;
-
- uses
- FaceStorMP, FaceProcMP;
- var
- theFlag, theListItem, theMenuItem: integer;
- theString: string[31];
-
- begin
- fRec.uName := 'Tutorial.Rsrc';
- FaceIt(nil, DoInit, 0, 0, 0, 0);
- theFlag := 0;
- theListItem := 3;
- theMenuItem := 2;
- theString := 'Hello';
- repeat
- FaceIt(nil, DoLoop, 0, 0, 0, 0);
- if (fRec.uMenuID = 105) and (fRec.uMenuItem = 1) then
- begin
- FaceIt(nil, NewWnd, 1010, 0, 0, 0);
- FaceIt(nil, GetCtl, 1010, 0, 1, 3);
- FaceIt(nil, LnkCtl, ord(fRec.cControl), ord(@theFlag), 2, 0);
- FaceIt(nil, GetCtl, 1010, 0, 1, 4);
- FaceIt(nil, LnkCtl, ord(fRec.cControl), ord(@theString), -31, 0);
- FaceIt(nil, GetCtl, 1010, 0, 1, 5);
- FaceIt(nil, LnkCtl, ord(fRec.cControl), ord(@theListItem), 2, 0);
- FaceIt(nil, GetCtl, 1010, 0, 1, 6);
- FaceIt(nil, LnkCtl, ord(fRec.cControl), ord(@theMenuItem), 2, 0);
- FaceIt(nil, SetVal, 1010, 0, 0, 0);
- repeat
- FaceIt(nil, MdlWnd, 1010, 0, 0, 0);
- if (fRec.uMenuID = 1010) then
- if (fRec.wcHit = -1) then
- leave
- else if (fRec.wcHit = 1) then
- begin
- FaceIt(nil, GetVal, 1010, 0, 0, 0);
- leave;
- end
- else if (fRec.wcHit = 2) then
- begin
- FaceIt(nil, GetCtl, 1010, 0, 1, 8);
- fRec.uString := 'Run button was hit.';
- FaceIt(fRec.cControl, 1565, 2, 0, 0, 0);
- end;
- until false;
- FaceIt(nil, EndWnd, 1010, 0, 0, 0);
- end;
- until false;
- end.